﻿@model List<DatNuocViet.Models.Tour>

@{
    Layout = null;
    int count = 0;
    string lang = (Session["Language"] == null) ? "vi" : Session["Language"].ToString();
}
@helper Truncate(string input, int length)
{
    if (!string.IsNullOrEmpty(input))
    {
        if (input.Length <= length)
        {
            @input
        }
        else
        {
            @input.Substring(0, length)<text>...</text>
        }
    }
}

@foreach(var item in Model)
{
    count++;
<div class="col-top-@(count)">
    <span class="name-col">@DatNuocViet.Ultility.Helper.Truncate(item.Location, 12)</span> 
    <a class="img-link" href="@Url.Action("Details", "Tours", new { id = item.Id})"><span class="img-style">
        <img src="@DatNuocViet.Models.ToursDAO.GetImageTours(item.Id)" alt="@if (lang == "en") { @Html.Raw(item.NameEn); } else { @Html.Raw(item.NameVn); }" width="252" height="145"></span>
    </a>
    <a class="button-extra" href="@Url.Action("Details", "Tours", new { id = item.Id})"><span>@DatNuocViet.Ultility.Helper.Label("text_xem")</span></a>
</div>
}
